<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>[|.siteName|]</title>
    [|if .zTree|]
    <link rel="stylesheet" href="/static/zTree3/css/demo.css?t=5" type="text/css">
    <link rel="stylesheet" href="/static/zTree3/css/zTreeStyle/zTreeStyle.css" type="text/css">
    [|end|]
    <link rel="stylesheet" href="/static/layui/css/layui.css">
    <link rel="stylesheet" href="/static/css/main.css">
    <script src="/static/layui/layui.js?s=36"></script>
    <script src="/static/js/main.js?s=2124"></script>
</head>

<body>
<div>
    <form>
        <div>
            <p>
                <label id="" style="color:rgb(0, 0, 0);">金币总量:</label>
                <label id="userallgold" style="color:red;">0</label>
               
            </p>
        </div>

    </form>
    <table  class="layui-table" id="userinfotable" lay-size="sm" lay-filter="layfilteruserinfotable"> </table> 
</div>

<script>
    var $;

    layui.config({
            base : "js/"
    }).use(['form','element','layer','jquery','table'], function(){
        var table = layui.table;
        var element = layui.element;
        var form = layui.form;
        $ = layui.jquery;
    //监听表格复选框选择
   // table.on('checkbox(demo)', function(obj){
    //   console.log(obj);
   // });

    ShowTablesDatas(table)
 

    //监听单元格事件
    table.on('tool(layfilteruserinfotable)', function(obj){
      var data = obj.data;
       if(obj.event === 'UserInfo'){
           window.location.href="/usersfinduser/userinfopage.html?UserID=" + data.columnA +"&UserNickName=" + data.columnB;
           return false;
       }
     });
   
    return false;
}); 


function ShowTablesDatas(thisTabble){
 
    thisTabble.render({
        elem:'#userinfotable'
        ,url:'/userrecord/userrecordcaretable'
        ,where: {
       
        }
        ,done: function(res, curr, count) {
            GetPageTitleData(res.titleinfo)
        }
        ,cols: [[ //标题栏
        
            {field:'columnA',title:'推广号',width:100,event: 'UserInfo', style:'cursor: pointer;color: #104E8B;'}
            ,{field:'columnB',title:'昵称',width:140,event: 'UserInfo', style:'cursor: pointer;color: #104E8B;'}
            ,{field:'columnC',title:'资产',width:150}
            ,{field:'columnD',title:'总输赢',width:150}
            ,{field:'columnE',title:'当日输赢',width:130}
            ,{field:'columnF',title:'买分总和',width:150}
            ,{field:'columnG',title:'卖分总和',width:150}
            ,{field:'columnH',title:'作弊率',width:150}
            ,{field:'columnI',title:'作弊限额',width:150}
            ,{field:'columnJ',title:'运行状态',width:150}
            ,{field:'columnK',title:'点控完成时间',width:120}
                ]] 
        ,skin: 'row' //表格风格
        ,even: true
        ,page: true //是否显示分页
        ,limits: [50,100,200]
        ,limit: 100//每页默认显示的数量
        ,width: 'full-10'
        ,rules: 'all'
        ,height: 'full-110'
    });
}

function GetPageTitleData(titleinfo){
   // alert(JSON.stringify(titleinfo))
    if (titleinfo.length > 0)
    {
        document.getElementById("userallgold").innerHTML = titleinfo[0].ALLGOLD;
    }
  
    return false;
 
}

</script>
</body>

</html>